home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / usenet / volume6 / conquer4 / patch6c < prev    next >
Encoding:
Internet Message Format  |  1989-10-02  |  48.3 KB

  1. Path: uunet!zephyr.ens.tek.com!tekgen!tekred!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v08i034:  conquer4 - middle earth multi-player game (V4), Patch6c
  5. Message-ID: <4602@tekred.CNA.TEK.COM>
  6. Date: 21 Sep 89 13:15:32 GMT
  7. Sender: news@tekred.CNA.TEK.COM
  8. Lines: 1800
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: Adam Bryant <adb@cs.bu.edu>
  12. Posting-number: Volume 8, Issue 34
  13. Archive-name: conquer4/Patch6c
  14. Patch-To: conquer4: Volume 6, Issue 83-96
  15.  
  16.  
  17. #!/bin/sh
  18. # this is part 3 of a multipart archive
  19. # do not concatenate these parts, unpack them in order with /bin/sh
  20. # file patchV4.6 continued
  21. #
  22. CurArch=3
  23. if test ! -r s2_seq_.tmp
  24. then echo "Please unpack part 1 first!"
  25.      exit 1; fi
  26. ( read Scheck
  27.   if test "$Scheck" != $CurArch
  28.   then echo "Please unpack part $Scheck next!"
  29.        exit 1;
  30.   else exit 0; fi
  31. ) < s2_seq_.tmp || exit 1
  32. sed 's/^X//' << 'SHAR_EOF' >> patchV4.6
  33. X--- move.c    Wed Sep 20 21:41:27 1989
  34. X***************
  35. X*** 161,167 ****
  36. X              if(hilmode==3) {
  37. X                  for(i=XREAL-xoffset-1;i<=XREAL-xoffset+1;i++){
  38. X                      for(j=YREAL-yoffset-1;j<=YREAL-yoffset+1;j++){
  39. X!                         highlight(i,j);
  40. X                          see(i,j);
  41. X                      }
  42. X                  }
  43. X--- 161,167 ----
  44. X              if(hilmode==3) {
  45. X                  for(i=XREAL-xoffset-1;i<=XREAL-xoffset+1;i++){
  46. X                      for(j=YREAL-yoffset-1;j<=YREAL-yoffset+1;j++){
  47. X!                         highlight(i,j,hilmode);
  48. X                          see(i,j);
  49. X                      }
  50. X                  }
  51. X***************
  52. X*** 176,182 ****
  53. X                  }
  54. X              } else for(i=XREAL-xoffset-1;i<=XREAL-xoffset+1;i++){
  55. X                  for(j=YREAL-yoffset-1;j<=YREAL-yoffset+1;j++){
  56. X!                     highlight(i,j);
  57. X                      see(i,j);
  58. X                  }
  59. X              }
  60. X--- 176,182 ----
  61. X                  }
  62. X              } else for(i=XREAL-xoffset-1;i<=XREAL-xoffset+1;i++){
  63. X                  for(j=YREAL-yoffset-1;j<=YREAL-yoffset+1;j++){
  64. X!                     highlight(i,j,hilmode);
  65. X                      see(i,j);
  66. X                  }
  67. X              }
  68. X***************
  69. X*** 407,414 ****
  70. X                      done=TRUE;
  71. X                  }
  72. X              }
  73. X  
  74. X!             if( done==FALSE ) {
  75. X              standout();
  76. X              if(armornvy==ARMY){
  77. X                  mvprintw(LINES-2,0,"MOVESCREEN: move left: %d",P_AMOVE);
  78. X--- 407,415 ----
  79. X                      done=TRUE;
  80. X                  }
  81. X              }
  82. X+         }
  83. X  
  84. X!         if( done==FALSE ) {
  85. X              standout();
  86. X              if(armornvy==ARMY){
  87. X                  mvprintw(LINES-2,0,"MOVESCREEN: move left: %d",P_AMOVE);
  88. X***************
  89. X*** 428,440 ****
  90. X              for(i=XREAL-1;i<=XREAL+1;i++)
  91. X              for(j=YREAL-1;j<=YREAL+1;j++) if(ONMAP(i,j))
  92. X                  if(!canbeseen((int)i,(int)j)) {
  93. X!                     highlight(i-xoffset,j-yoffset);
  94. X                      see(i-xoffset,j-yoffset);
  95. X                  }
  96. X- 
  97. X-             }
  98. X-             makeside(TRUE);
  99. X          }
  100. X          move(ycurs,xcurs*2);
  101. X          refresh();
  102. X      }
  103. X--- 429,439 ----
  104. X              for(i=XREAL-1;i<=XREAL+1;i++)
  105. X              for(j=YREAL-1;j<=YREAL+1;j++) if(ONMAP(i,j))
  106. X                  if(!canbeseen((int)i,(int)j)) {
  107. X!                     highlight(i-xoffset,j-yoffset,hilmode);
  108. X                      see(i-xoffset,j-yoffset);
  109. X                  }
  110. X          }
  111. X+         makeside(TRUE);
  112. X          move(ycurs,xcurs*2);
  113. X          refresh();
  114. X      }
  115. X***************
  116. X*** 508,514 ****
  117. X                  } else{
  118. X                      flee(XREAL,YREAL,0,FALSE);
  119. X                  }
  120. X!                 mvprintw(LINES-2,0,"TAKING SECTOR");
  121. X                  clrtoeol();
  122. X                  refresh();
  123. X                  sleep(2);
  124. X--- 507,513 ----
  125. X                  } else{
  126. X                      flee(XREAL,YREAL,0,FALSE);
  127. X                  }
  128. X!                 mvaddstr(LINES-2,0,"TAKING SECTOR");
  129. X                  clrtoeol();
  130. X                  refresh();
  131. X                  sleep(2);
  132. X***************
  133. X*** 548,554 ****
  134. X          return;
  135. X      } else {
  136. X          /*else navy*/
  137. X!         mvprintw(LINES-1,0,"NAVY DONE: ");
  138. X          clrtoeol();
  139. X          P_NXLOC=XREAL;
  140. X          P_NYLOC=YREAL;
  141. X--- 547,553 ----
  142. X          return;
  143. X      } else {
  144. X          /*else navy*/
  145. X!         mvaddstr(LINES-1,0,"NAVY DONE: ");
  146. X          clrtoeol();
  147. X          P_NXLOC=XREAL;
  148. X          P_NYLOC=YREAL;
  149. X***************
  150. X*** 570,585 ****
  151. X          if (magic(country,SAILOR)==TRUE) mvused/=2;
  152. X          if (mvused!=0) mvused= (rand()%mvused);
  153. X          P_NPEOP = (unsigned char) (P_NPEOP*(LONGTRIP-mvused)/LONGTRIP);
  154. X!         mvprintw(LINES-1,60,"HIT ANY KEY");
  155. X          refresh();
  156. X          getch();
  157. X      }
  158. X      whatcansee();
  159. X      redraw=DONE;
  160. X!     prep(country,FALSE,TRUE);
  161. X      makemap();
  162. X      armornvy=AORN;
  163. X-     makebottom();
  164. X      pager=0;
  165. X      selector=0;
  166. X  }
  167. X--- 569,583 ----
  168. X          if (magic(country,SAILOR)==TRUE) mvused/=2;
  169. X          if (mvused!=0) mvused= (rand()%mvused);
  170. X          P_NPEOP = (unsigned char) (P_NPEOP*(LONGTRIP-mvused)/LONGTRIP);
  171. X!         mvaddstr(LINES-1,60,"HIT ANY KEY");
  172. X          refresh();
  173. X          getch();
  174. X      }
  175. X      whatcansee();
  176. X      redraw=DONE;
  177. X!     prep(country,FALSE);
  178. X      makemap();
  179. X      armornvy=AORN;
  180. X      pager=0;
  181. X      selector=0;
  182. X  }
  183. X*** oupdate.c    Wed Sep 20 21:41:01 1989
  184. X--- update.c    Wed Sep 20 21:41:31 1989
  185. X***************
  186. X*** 11,17 ****
  187. X--- 11,21 ----
  188. X   */
  189. X  
  190. X  #include <ctype.h>
  191. X+ #ifndef    XENIX
  192. X  #include <sys/file.h>
  193. X+ #else
  194. X+ #include    <unistd.h>
  195. X+ #endif
  196. X  #include "header.h"
  197. X  #include "data.h"
  198. X  
  199. X***************
  200. X*** 18,24 ****
  201. X  extern FILE *fnews;
  202. X  
  203. X  extern short country;
  204. X! int    dissarray;        /* TRUE if nation in dissarray */
  205. X  int    **attr;            /* sector attractiveness */
  206. X  
  207. X  /****************************************************************/
  208. X--- 22,28 ----
  209. X  extern FILE *fnews;
  210. X  
  211. X  extern short country;
  212. X! int    disarray;        /* TRUE if nation in disarray */
  213. X  int    **attr;            /* sector attractiveness */
  214. X  
  215. X  /****************************************************************/
  216. X***************
  217. X*** 356,362 ****
  218. X                  }
  219. X                  if(sct[x][y].owner==0){
  220. X                      sct[x][y].owner=country;
  221. X!                     curntn->popularity++;
  222. X  #ifdef XENIX
  223. X                      z = attr[x][y];
  224. X                      z /= 8;
  225. X--- 360,366 ----
  226. X                  }
  227. X                  if(sct[x][y].owner==0){
  228. X                      sct[x][y].owner=country;
  229. X!                     if (curntn->popularity<MAXTGVAL) curntn->popularity++;
  230. X  #ifdef XENIX
  231. X                      z = attr[x][y];
  232. X                      z /= 8;
  233. X***************
  234. X*** 394,400 ****
  235. X                  P_AXLOC=x;
  236. X                  P_AYLOC=y;
  237. X                  if(sct[x][y].owner==0){
  238. X!                     curntn->popularity++;
  239. X                      sct[x][y].owner=country;
  240. X                      attr[x][y] = 1;
  241. X                      takesctr++;
  242. X--- 398,404 ----
  243. X                  P_AXLOC=x;
  244. X                  P_AYLOC=y;
  245. X                  if(sct[x][y].owner==0){
  246. X!                     if (curntn->popularity<MAXTGVAL) curntn->popularity++;
  247. X                      sct[x][y].owner=country;
  248. X                      attr[x][y] = 1;
  249. X                      takesctr++;
  250. X***************
  251. X*** 445,451 ****
  252. X      /* take inventory of countries */
  253. X      for(x=1;x<NTOTAL;x++) {
  254. X          sprintf(tempc,"%s%d", exefile, x);
  255. X!         if (isnpc(ntn[x].active) && access(tempc,F_OK)==0) {
  256. X              realnpc[x]=TRUE;
  257. X          } else {
  258. X              realnpc[x]=FALSE;
  259. X--- 449,455 ----
  260. X      /* take inventory of countries */
  261. X      for(x=1;x<NTOTAL;x++) {
  262. X          sprintf(tempc,"%s%d", exefile, x);
  263. X!         if (isnpc(ntn[x].active) && access(tempc,00)==0) {
  264. X              realnpc[x]=TRUE;
  265. X          } else {
  266. X              realnpc[x]=FALSE;
  267. X***************
  268. X*** 558,564 ****
  269. X          printf("updating nation number %d -> %s\n",country,curntn->name);
  270. X      check();
  271. X  
  272. X!         dissarray=FALSE;
  273. X  #ifdef TRADE
  274. X          if(isntn(curntn->active)) checktrade();
  275. X  #endif TRADE
  276. X--- 562,568 ----
  277. X          printf("updating nation number %d -> %s\n",country,curntn->name);
  278. X      check();
  279. X  
  280. X!         disarray=FALSE;
  281. X  #ifdef TRADE
  282. X          if(isntn(curntn->active)) checktrade();
  283. X  #endif TRADE
  284. X***************
  285. X*** 570,578 ****
  286. X  #ifdef CMOVE
  287. X              printf("\tthe computer will move for %s\n",curntn->name);
  288. X              fprintf(fnews,"1.\tthe computer will move for %s\n",curntn->name);
  289. X!             mailopen( country );
  290. X!             fprintf(fm,"the computer moved for you (%s) in %s of Year %d\n",curntn->name,PSEASON(TURN),YEAR(TURN));
  291. X!             mailclose();
  292. X              check();
  293. X              nationrun();
  294. X              check();
  295. X--- 574,584 ----
  296. X  #ifdef CMOVE
  297. X              printf("\tthe computer will move for %s\n",curntn->name);
  298. X              fprintf(fnews,"1.\tthe computer will move for %s\n",curntn->name);
  299. X!             if (mailopen( country )!=(-1)) {
  300. X!                 fprintf(fm,"Message to %s from CONQUER\n\n",curntn->name);
  301. X!                 fprintf(fm,"The computer moved for you in the %s of Year %d\n",curntn->name,PSEASON(TURN),YEAR(TURN));
  302. X!                 mailclose(country);
  303. X!             }
  304. X              check();
  305. X              nationrun();
  306. X              check();
  307. X***************
  308. X*** 599,614 ****
  309. X  #endif /*NPC*/
  310. X          }
  311. X  
  312. X!         /* is leader killed - put nation into dissarray */
  313. X          x = getleader((int)curntn->class) - 1;
  314. X          for(armynum=0;armynum<MAXARM;armynum++)
  315. X!             if(P_ATYPE == x) break;
  316. X  #ifdef DEBUG
  317. X  printf("checking for leader in nation %s: armynum=%d\n",curntn->name,armynum);
  318. X  #endif DEBUG
  319. X  
  320. X!         if(armynum == MAXARM) {
  321. X!             dissarray=TRUE;
  322. X              if(rand()%100 < 30) {    /* new leader takes over */
  323. X                  x++;
  324. X                  for(armynum=0;armynum<MAXARM;armynum++)
  325. X--- 605,623 ----
  326. X  #endif /*NPC*/
  327. X          }
  328. X  
  329. X!         /* is leader killed - put nation into disarray */
  330. X!         disarray=TRUE;
  331. X          x = getleader((int)curntn->class) - 1;
  332. X          for(armynum=0;armynum<MAXARM;armynum++)
  333. X!         if(P_ATYPE == x && P_ASOLD>0) {
  334. X!             disarray=FALSE;
  335. X!             break;
  336. X!         }
  337. X  #ifdef DEBUG
  338. X  printf("checking for leader in nation %s: armynum=%d\n",curntn->name,armynum);
  339. X  #endif DEBUG
  340. X  
  341. X!         if(disarray == TRUE) {
  342. X              if(rand()%100 < 30) {    /* new leader takes over */
  343. X                  x++;
  344. X                  for(armynum=0;armynum<MAXARM;armynum++)
  345. X***************
  346. X*** 616,643 ****
  347. X                  if( armynum<MAXARM) {
  348. X                      P_ATYPE=x-1;
  349. X                      P_ASOLD= *(unitminsth+(x-1)%UTYPE);
  350. X!                     dissarray=FALSE;
  351. X                      fprintf(stderr,"new leader in nation %s\n",curntn->name);
  352. X                      fprintf(fnews,"1.\tnation %s has a new leader\n",curntn->name);
  353. X                      if(ispc(curntn->active)){
  354. X!                         mailopen(country);
  355. X!                         fprintf(fm,"MESSAGE FROM CONQUER: YOU HAVE A NEW LEADER\n");
  356. X!                         fprintf(fm,"YOUR TROOPS MAY NOW MOVE NORMALLY\n");
  357. X!                         mailclose();
  358. X                      }
  359. X                  }
  360. X              }
  361. X!         } else dissarray=FALSE;
  362. X  
  363. X!         if( dissarray ==  TRUE) {
  364. X              fprintf(stderr,"no leader in nation %s\n",curntn->name);
  365. X              fprintf(fnews,"1.\tnation %s still has no national leader\n",curntn->name);
  366. X              if(ispc(curntn->active)){
  367. X!                 mailopen(country);
  368. X!                 fprintf(fm,"MESSAGE FROM CONQUER: YOU DONT HAVE A COUNTRY LEADER\n");
  369. X!                 fprintf(fm,"YOUR TROOPS MAY NOT MOVE\n");
  370. X!                 fprintf(fm,"THERE IS A 30%% CHANCE/TURN OF GETTING A NEW ONE \n");
  371. X!                 mailclose();
  372. X              }
  373. X          }
  374. X  
  375. X--- 625,656 ----
  376. X                  if( armynum<MAXARM) {
  377. X                      P_ATYPE=x-1;
  378. X                      P_ASOLD= *(unitminsth+(x-1)%UTYPE);
  379. X!                     disarray=FALSE;
  380. X                      fprintf(stderr,"new leader in nation %s\n",curntn->name);
  381. X                      fprintf(fnews,"1.\tnation %s has a new leader\n",curntn->name);
  382. X                      if(ispc(curntn->active)){
  383. X!                         if (mailopen(country)!=(-1)) {
  384. X!                             fprintf(fm,"MESSAGE FROM CONQUER:\n\n");
  385. X!                             fprintf(fm,"YOU HAVE A NEW NATIONAL LEADER.\n");
  386. X!                             fprintf(fm,"YOUR TROOPS MAY NOW MOVE NORMALLY.\n");
  387. X!                             mailclose(country);
  388. X!                         }
  389. X                      }
  390. X                  }
  391. X              }
  392. X!         }
  393. X  
  394. X!         if( disarray ==  TRUE) {
  395. X              fprintf(stderr,"no leader in nation %s\n",curntn->name);
  396. X              fprintf(fnews,"1.\tnation %s still has no national leader\n",curntn->name);
  397. X              if(ispc(curntn->active)){
  398. X!                 if (mailopen(country)!=(-1)) {
  399. X!                     fprintf(fm,"MESSAGE FROM CONQUER\n\n");
  400. X!                     fprintf(fm,"YOU DON'T HAVE A COUNTRY LEADER;\n");
  401. X!                     fprintf(fm,"YOUR TROOPS MAY NOT MOVE\n");
  402. X!                     fprintf(fm,"THERE IS A 30%% CHANCE/TURN OF GETTING A NEW ONE\n");
  403. X!                     mailclose(country);
  404. X!                 }
  405. X              }
  406. X          }
  407. X  
  408. X***************
  409. X*** 818,824 ****
  410. X                  sptr = &sct[P_AXLOC][P_AYLOC];
  411. X                  if(sptr->owner==0){
  412. X                      sptr->owner=country;
  413. X!                     curntn->popularity++;
  414. X                  } else if((sptr->owner!=country)
  415. X                  &&(curntn->dstatus[sptr->owner]>=WAR)) {
  416. X                      if(ntn[sptr->owner].race!=curntn->race)
  417. X--- 831,837 ----
  418. X                  sptr = &sct[P_AXLOC][P_AYLOC];
  419. X                  if(sptr->owner==0){
  420. X                      sptr->owner=country;
  421. X!                     if (curntn->popularity<MAXTGVAL) curntn->popularity++;
  422. X                  } else if((sptr->owner!=country)
  423. X                  &&(curntn->dstatus[sptr->owner]>=WAR)) {
  424. X                      if(ntn[sptr->owner].race!=curntn->race)
  425. X***************
  426. X*** 858,876 ****
  427. X                      /* capture the scout */
  428. X                      P_ASOLD=0;
  429. X                      if (ispc(curntn->active)) {
  430. X!                         mailopen(country);
  431. X!                         fprintf(fm,"Message from Conquer\n\n");
  432. X!                         fprintf(fm,"\tYour Scouting Unit %d was captured\n");
  433. X!                         fprintf(fm,"\t  by %s military in sector %d,%d\n",
  434. X!                             ntn[occval].name,(int)P_AXLOC,(int)P_AYLOC);
  435. X!                         mailclose();
  436. X                      }
  437. X                      if (ispc(ntn[occval].active)) {
  438. X!                         mailopen(occval);
  439. X!                         fprintf(fm,"Message from Conquer\n\n");
  440. X!                         fprintf(fm,"\tA Scout from nation %s was captured\n",curntn->name);
  441. X!                         fprintf(fm,"\t  in sector %d,%d.\n",(int)P_AXLOC,(int)P_AYLOC);
  442. X!                         mailclose();
  443. X                      }
  444. X                  }
  445. X              }
  446. X--- 871,891 ----
  447. X                      /* capture the scout */
  448. X                      P_ASOLD=0;
  449. X                      if (ispc(curntn->active)) {
  450. X!                         if(mailopen(country)!=(-1)) {
  451. X!                             fprintf(fm,"Message from Conquer\n\n");
  452. X!                             fprintf(fm,"\tYour Scouting Unit %d was captured\n");
  453. X!                             fprintf(fm,"\t  by %s military in sector %d,%d\n",
  454. X!                                    ntn[occval].name,(int)P_AXLOC,(int)P_AYLOC);
  455. X!                             mailclose(country);
  456. X!                         }
  457. X                      }
  458. X                      if (ispc(ntn[occval].active)) {
  459. X!                         if(mailopen(occval)!=(-1)) {
  460. X!                             fprintf(fm,"Message from Conquer\n\n");
  461. X!                             fprintf(fm,"\tA Scout from nation %s was captured\n",curntn->name);
  462. X!                             fprintf(fm,"\t  in sector %d,%d.\n",(int)P_AXLOC,(int)P_AYLOC);
  463. X!                             mailclose(occval);
  464. X!                         }
  465. X                      }
  466. X                  }
  467. X              }
  468. X***************
  469. X*** 998,1004 ****
  470. X              }
  471. X  
  472. X              spreadsheet(country);
  473. X!             curntn->popularity = min(0,(int)(curntn->popularity-2*curntn->inflation));
  474. X              curntn->tsctrs = spread.sectors;
  475. X              curntn->tciv=spread.civilians;
  476. X              curntn->tfood=spread.food;
  477. X--- 1013,1021 ----
  478. X              }
  479. X  
  480. X              spreadsheet(country);
  481. X!             if ((int)curntn->popularity-2*curntn->inflation < (int)MAXTGVAL) {
  482. X!                 curntn->popularity = min(0,(int)(curntn->popularity-2*curntn->inflation));
  483. X!             } else curntn->popularity = (char) MAXTGVAL;
  484. X              curntn->tsctrs = spread.sectors;
  485. X              curntn->tciv=spread.civilians;
  486. X              curntn->tfood=spread.food;
  487. X***************
  488. X*** 1006,1019 ****
  489. X              /* take out for charity */
  490. X              charity=((spread.gold-curntn->tgold)*curntn->charity)/100;
  491. X  
  492. X!             if(charity > 0) charity = 0;
  493. X              if(curntn->tciv > 0) charity /= curntn->tciv;
  494. X              else charity = 0;
  495. X  
  496. X              curntn->tgold = spread.gold - charity;
  497. X  
  498. X!             /* give them some benefit of the doubt */
  499. X!             curntn->popularity += 5*charity;
  500. X              if(curntn->poverty < (charity+1)/2 )
  501. X                  curntn->poverty = 0;
  502. X              else    curntn->poverty -= (charity+1)/2;
  503. X--- 1023,1056 ----
  504. X              /* take out for charity */
  505. X              charity=((spread.gold-curntn->tgold)*curntn->charity)/100;
  506. X  
  507. X!             if(charity < 0) charity = 0;
  508. X              if(curntn->tciv > 0) charity /= curntn->tciv;
  509. X              else charity = 0;
  510. X  
  511. X              curntn->tgold = spread.gold - charity;
  512. X  
  513. X!             /* calculate poverty base */
  514. X!             if (curntn->tgold < 0L) {
  515. X!                 curntn->poverty = 95;
  516. X!             } else if (curntn->tciv < 100L) {
  517. X!                 /* give some check on civilians */
  518. X!                 curntn->poverty = (unsigned char)20;
  519. X!             } else if (curntn->tgold/curntn->tciv < 30L) {
  520. X!                 curntn->poverty = (unsigned char)(95L - curntn->tgold/curntn->tciv);
  521. X!             } else if (curntn->tgold/curntn->tciv < 80L) {
  522. X!                 curntn->poverty = (unsigned char)(65L - (curntn->tgold/curntn->tciv-30L)/2L);
  523. X!             } else if (curntn->tgold/curntn->tciv < 120L) {
  524. X!                 curntn->poverty = (unsigned char)(40L - (curntn->tgold/curntn->tciv-80L)/4L);
  525. X!             } else if (curntn->tgold/curntn->tciv < 200L) {
  526. X!                 curntn->poverty = (unsigned char)(30L - (curntn->tgold/curntn->tciv-120L)/8L);
  527. X!             } else {
  528. X!                 curntn->poverty = (unsigned char)20;
  529. X!             }
  530. X! 
  531. X!             /* charity increase to popularity */
  532. X!             curntn->popularity = min(curntn->popularity+5*charity,MAXTGVAL);
  533. X! 
  534. X!             /* charity adjustment to poverty; rounding upward */
  535. X              if(curntn->poverty < (charity+1)/2 )
  536. X                  curntn->poverty = 0;
  537. X              else    curntn->poverty -= (charity+1)/2;
  538. X***************
  539. X*** 1027,1040 ****
  540. X              /* adjustment for military */
  541. X              if (spread.civilians>0)
  542. X                  curntn->inflation += ((curntn->tmil*100/spread.civilians - 15)/5);
  543. X!             /* adjustment for debt and/or wealth */
  544. X!             if(curntn->tgold<75000L) {
  545. X!                 curntn->inflation += (short)(-(curntn->tgold/25000L)+1);
  546. X!             } else if(curntn->tgold<100000L) {
  547. X!                 curntn->inflation -= 1;
  548. X!             } else if(curntn->tgold>=200000L) {
  549. X!                 curntn->inflation += (short)(curntn->tgold/100000L-1);
  550. X!             }
  551. X              /* plus maybe an adjustment for jewel production as a ratio */
  552. X              /* for whatever is produced by the country.                 */
  553. X  
  554. X--- 1064,1072 ----
  555. X              /* adjustment for military */
  556. X              if (spread.civilians>0)
  557. X                  curntn->inflation += ((curntn->tmil*100/spread.civilians - 15)/5);
  558. X!             /* adjustment for poverty */
  559. X!             curntn->inflation += (curntn->poverty-50)/2;
  560. X! 
  561. X              /* plus maybe an adjustment for jewel production as a ratio */
  562. X              /* for whatever is produced by the country.                 */
  563. X  
  564. X***************
  565. X*** 1066,1083 ****
  566. X      if(isntn(ntn[country].active)){
  567. X          curntn = &ntn[country];
  568. X  
  569. X          if(ispc(curntn->active)) {
  570. X          prep( country, TRUE );    /* occ[][] now >0 if leader near */
  571. X          dfltunit = defaultunit(country);
  572. X          } else dfltunit = A_INFANTRY;
  573. X  
  574. X-         dissarray=TRUE;
  575. X-         for(armynum=0;armynum<MAXARM;armynum++)
  576. X-             if (P_ATYPE==(getleader(curntn->class)-1) && P_ASOLD>0) {
  577. X-                 dissarray=FALSE;
  578. X-                 break;
  579. X-             }
  580. X- 
  581. X          for(armynum=0;armynum<MAXARM;armynum++) if(P_ASOLD>0) {
  582. X  
  583. X              A = &curntn->arm[armynum];
  584. X--- 1098,1116 ----
  585. X      if(isntn(ntn[country].active)){
  586. X          curntn = &ntn[country];
  587. X  
  588. X+         disarray=TRUE;
  589. X+         dfltunit=(getleader(curntn->class)-1);
  590. X+         for(armynum=0;armynum<MAXARM;armynum++)
  591. X+             if (P_ATYPE==dfltunit && P_ASOLD>0) {
  592. X+                 disarray=FALSE;
  593. X+                 break;
  594. X+             }
  595. X+ 
  596. X          if(ispc(curntn->active)) {
  597. X          prep( country, TRUE );    /* occ[][] now >0 if leader near */
  598. X          dfltunit = defaultunit(country);
  599. X          } else dfltunit = A_INFANTRY;
  600. X  
  601. X          for(armynum=0;armynum<MAXARM;armynum++) if(P_ASOLD>0) {
  602. X  
  603. X              A = &curntn->arm[armynum];
  604. X***************
  605. X*** 1102,1108 ****
  606. X  
  607. X              /*add movement to all armies */
  608. X              /*unitmove is 10 times movement rate*/
  609. X!             if(dissarray) A->smove=0;
  610. X              else switch(A->stat) {
  611. X              case MARCH:
  612. X                  A->smove=(curntn->maxmove * *(unitmove+(AT%UTYPE)))/5;
  613. X--- 1135,1141 ----
  614. X  
  615. X              /*add movement to all armies */
  616. X              /*unitmove is 10 times movement rate*/
  617. X!             if(disarray) A->smove=0;
  618. X              else switch(A->stat) {
  619. X              case MARCH:
  620. X                  A->smove=(curntn->maxmove * *(unitmove+(AT%UTYPE)))/5;
  621. X***************
  622. X*** 1215,1227 ****
  623. X                  curntn->jewels -= (long) (*(unitmaint+(AT%UTYPE)));
  624. X                  else {
  625. X                      if(ispc(curntn->active)) {
  626. X!                     mailopen(country);
  627. X!                     fprintf(fm,"Message to %s from Conquer\n",curntn->name);
  628. X!                     fprintf(fm,"\nYour %s (unit %d) leaves due to lack of jewels\n",
  629. X!                         *(unittype+(AT%UTYPE)),armynum);
  630. X!                     mailclose();
  631. X!                     A->sold=0;
  632. X                      }
  633. X                  }
  634. X              }
  635. X          }
  636. X--- 1248,1261 ----
  637. X                  curntn->jewels -= (long) (*(unitmaint+(AT%UTYPE)));
  638. X                  else {
  639. X                      if(ispc(curntn->active)) {
  640. X!                     if(mailopen(country)!=(-1)) {
  641. X!                         fprintf(fm,"Message to %s from Conquer\n\n",curntn->name);
  642. X!                         fprintf(fm,"Your %s (unit %d) leaves due to lack of jewels\n",
  643. X!                                *(unittype+(AT%UTYPE)),armynum);
  644. X!                         mailclose(country);
  645. X!                         A->sold=0;
  646. X                      }
  647. X+                     }
  648. X                  }
  649. X              }
  650. X          }
  651. X***************
  652. X*** 1284,1290 ****
  653. X                  }
  654. X                  }
  655. X  #endif
  656. X!                 if(dissarray) P_NMOVE=0;
  657. X                  else P_NMOVE = (fltspeed(nvynum)*P_NCREW)/SHIPCREW;
  658. X                  if(magic(country,SAILOR)==TRUE) P_NMOVE*=2;
  659. X  
  660. X--- 1318,1324 ----
  661. X                  }
  662. X                  }
  663. X  #endif
  664. X!                 if(disarray) P_NMOVE=0;
  665. X                  else P_NMOVE = (fltspeed(nvynum)*P_NCREW)/SHIPCREW;
  666. X                  if(magic(country,SAILOR)==TRUE) P_NMOVE*=2;
  667. X  
  668. X***************
  669. X*** 1312,1322 ****
  670. X              curntn->name,siegex[army2],siegey[army2]);
  671. X  #endif HIDELOC
  672. X          if(ispc(curntn->active)) {
  673. X!             mailopen( country );
  674. X!             fprintf(fm, "Message to %s from Conquer\n\n",ntn[nation].name);
  675. X!             fprintf(fm, "\tYou are under siege in sector %d,%d.\n",
  676. X!                 siegex[army2],siegey[army2]);
  677. X!             mailclose();
  678. X          }
  679. X          for(armynum=0;armynum<MAXARM;armynum++) if(P_ASOLD>0){
  680. X              if(P_ASTAT!=FLIGHT&&(P_AXLOC==siegex[army2])
  681. X--- 1346,1357 ----
  682. X              curntn->name,siegex[army2],siegey[army2]);
  683. X  #endif HIDELOC
  684. X          if(ispc(curntn->active)) {
  685. X!             if (mailopen( country )!=(-1)) {
  686. X!                 fprintf(fm, "Message to %s from Conquer\n\n",ntn[nation].name);
  687. X!                 fprintf(fm, "\tYou are under siege in sector %d,%d.\n",
  688. X!                        siegex[army2],siegey[army2]);
  689. X!                 mailclose(country);
  690. X!             }
  691. X          }
  692. X          for(armynum=0;armynum<MAXARM;armynum++) if(P_ASOLD>0){
  693. X              if(P_ASTAT!=FLIGHT&&(P_AXLOC==siegex[army2])
  694. X***************
  695. X*** 1376,1388 ****
  696. X  #endif HIDELOC
  697. X                  printf("famine hits town at %d,%d in %s.\n",x,y,curntn->name);
  698. X                  if(ispc(curntn->active)){
  699. X!                 mailopen( country );
  700. X!                 fprintf(fm,"Message to %s from CONQUER\n%s\n",curntn->name,curntn->name);
  701. X!                 fprintf(fm," During the %s of Year %d,\n",PSEASON(TURN),YEAR(TURN));
  702. X!                 fprintf(fm," a famine hit your town at %d,%d.\n",x,y);
  703. X!                 fprintf(fm," %d out of %d people died.\n",dead,sptr->people);
  704. X!                 mailclose();
  705. X                  }
  706. X              }
  707. X          }
  708. X          /*this state can occur if few people live in cities*/
  709. X--- 1411,1424 ----
  710. X  #endif HIDELOC
  711. X                  printf("famine hits town at %d,%d in %s.\n",x,y,curntn->name);
  712. X                  if(ispc(curntn->active)){
  713. X!                 if (mailopen( country )!=(-1)) {
  714. X!                     fprintf(fm,"Message to %s from CONQUER\n\n",curntn->name);
  715. X!                     fprintf(fm,"During the %s of Year %d,\n",PSEASON(TURN),YEAR(TURN));
  716. X!                     fprintf(fm,"a famine hit your town at %d,%d.\n",x,y);
  717. X!                     fprintf(fm,"%d out of %d people died.\n",dead,sptr->people);
  718. X!                     mailclose(country);
  719. X                  }
  720. X+                 }
  721. X              }
  722. X          }
  723. X          /*this state can occur if few people live in cities*/
  724. X***************
  725. X*** 1400,1405 ****
  726. X--- 1436,1450 ----
  727. X          if(curntn->tgold>GOLDTHRESH*curntn->jewels){
  728. X              /* buy jewels off commodities board */
  729. X              xx=curntn->tgold-GOLDTHRESH*curntn->jewels;
  730. X+             if (ispc(country)) {
  731. X+                 if (mailopen(country)!=(-1)) {
  732. X+                     fprintf(fm,"Message from Conquer\n\n");
  733. X+                     fprintf(fm,"Gold imbalance forced your treasury to purchase");
  734. X+                     fprintf(fm,"%ld jewels for %ld gold talons to compensate\n",
  735. X+                         xx*GODJEWL/GODPRICE,xx);
  736. X+                     mailclose(country);
  737. X+                 }
  738. X+             }
  739. X              curntn->jewels += (xx*GODJEWL/GODPRICE);
  740. X              curntn->tgold  -= xx;
  741. X          }
  742. X***************
  743. X*** 1455,1464 ****
  744. X                  P_ASTAT = DEFEND;
  745. X                  P_AMOVE = 2*curntn->maxmove;
  746. X                  if( ispc( ntn[nation].active ) ){
  747. X!                     mailopen( nation );
  748. X!                     fprintf(fm,"Message to %s from Conquer:\n",ntn[nation].name);
  749. X                      fprintf(fm,"\t\tMonster born in your nation!\n");
  750. X!                     mailclose();
  751. X                  }
  752. X                  printf("\tmonster born in nation %s\n",curntn->name); 
  753. X                  break;
  754. X--- 1500,1510 ----
  755. X                  P_ASTAT = DEFEND;
  756. X                  P_AMOVE = 2*curntn->maxmove;
  757. X                  if( ispc( ntn[nation].active ) ){
  758. X!                     if (mailopen( nation )!=(-1)) {
  759. X!                     fprintf(fm,"Message to %s from Conquer:\n\n",ntn[nation].name);
  760. X                      fprintf(fm,"\t\tMonster born in your nation!\n");
  761. X!                     mailclose(nation);
  762. X!                     }
  763. X                  }
  764. X                  printf("\tmonster born in nation %s\n",curntn->name); 
  765. X                  break;
  766. X***************
  767. X*** 1493,1502 ****
  768. X              P_ASTAT = DEFEND;
  769. X              P_AMOVE = 2*curntn->maxmove;
  770. X              if( ispc( ntn[nation].active ) ){
  771. X!                 mailopen( nation );
  772. X!                 fprintf(fm,"Message to %s from Conquer:\n",ntn[nation].name);
  773. X!                 fprintf(fm,"\t\tLeader born in your nation!\n");
  774. X!                 mailclose();
  775. X              }
  776. X              printf("\tleader born in nation %s\n",curntn->name); 
  777. X              break;
  778. X--- 1539,1549 ----
  779. X              P_ASTAT = DEFEND;
  780. X              P_AMOVE = 2*curntn->maxmove;
  781. X              if( ispc( ntn[nation].active ) ){
  782. X!                 if(mailopen( nation )!=(-1)) {
  783. X!                     fprintf(fm,"Message to %s from Conquer:\n\n",ntn[nation].name);
  784. X!                     fprintf(fm,"\t\tLeader born in your nation!\n");
  785. X!                     mailclose(nation);
  786. X!                 }
  787. X              }
  788. X              printf("\tleader born in nation %s\n",curntn->name); 
  789. X              break;
  790. X*** ocommands.c    Wed Sep 20 21:40:54 1989
  791. X--- commands.c    Wed Sep 20 21:41:32 1989
  792. X***************
  793. X*** 195,201 ****
  794. X              reset_god();
  795. X              return;
  796. X          case 'o':
  797. X!             mvprintw(LINES-3,7,"what nation owner:");
  798. X              refresh();
  799. X              x = get_country();
  800. X              if (x<NTOTAL) sptr->owner=x;
  801. X--- 195,201 ----
  802. X              reset_god();
  803. X              return;
  804. X          case 'o':
  805. X!             mvaddstr(LINES-3,7,"What nation owner:");
  806. X              refresh();
  807. X              x = get_country();
  808. X              if (x<NTOTAL) sptr->owner=x;
  809. X***************
  810. X*** 314,324 ****
  811. X  
  812. X      if((newdes!=DTOWN)&&(newdes!=DFORT)&&(newdes!=DCITY)&&(newdes!=DCAPITOL)){
  813. X          /*decrement treasury*/
  814. X!         if((newdes==DRUIN)||(newdes==DDEVASTATED)) {
  815. X!             DEVASTATE(XREAL,YREAL);
  816. X!         } else{
  817. X!             sptr->designation=newdes;
  818. X          }
  819. X          SADJDES;
  820. X          if(newdes == DSTOCKADE)
  821. X              curntn->tgold-=STOCKCOST*(1-isgod);
  822. X--- 314,330 ----
  823. X  
  824. X      if((newdes!=DTOWN)&&(newdes!=DFORT)&&(newdes!=DCITY)&&(newdes!=DCAPITOL)){
  825. X          /*decrement treasury*/
  826. X!         if(newdes==DRUIN) {
  827. X!             if (sptr->fortress>4) {
  828. X!                 sptr->fortress-=4;
  829. X!             } else {
  830. X!                 sptr->fortress=0;
  831. X!             }
  832. X!         } else if (sptr->designation==DRUIN) {
  833. X!             curntn->tgold-=REBUILDCOST;
  834. X          }
  835. X+         sptr->designation=newdes;
  836. X+ 
  837. X          SADJDES;
  838. X          if(newdes == DSTOCKADE)
  839. X              curntn->tgold-=STOCKCOST*(1-isgod);
  840. X***************
  841. X*** 684,690 ****
  842. X              NADJHLD;
  843. X              NADJLOC;
  844. X              NADJMOV;
  845. X!             mvprintw(LINES-2,65,"HIT ANY KEY");
  846. X              refresh();
  847. X              getch();
  848. X  
  849. X--- 690,696 ----
  850. X              NADJHLD;
  851. X              NADJLOC;
  852. X              NADJMOV;
  853. X!             mvaddstr(LINES-2,65,"HIT ANY KEY");
  854. X              refresh();
  855. X              getch();
  856. X  
  857. X***************
  858. X*** 881,887 ****
  859. X          return;
  860. X      } else if(i_cost > curntn->metals) {
  861. X          mvprintw(LINES-1,0,"You don't have %ld metal",i_cost);
  862. X!         mvprintw(LINES-1,COLS-20,"PRESS ANY KEY");
  863. X          clrtoeol();
  864. X          refresh();
  865. X          getch();
  866. X--- 887,893 ----
  867. X          return;
  868. X      } else if(i_cost > curntn->metals) {
  869. X          mvprintw(LINES-1,0,"You don't have %ld metal",i_cost);
  870. X!         mvaddstr(LINES-1,COLS-20,"PRESS ANY KEY");
  871. X          clrtoeol();
  872. X          refresh();
  873. X          getch();
  874. X***************
  875. X*** 1033,1039 ****
  876. X      char line[LINELTH+1], inpch;
  877. X      char save[LINELTH][LINELTH+1];
  878. X  
  879. X!     /*open file*/
  880. X      sprintf(tempfile,"%s%hd.tmp",msgfile,country);
  881. X      if( (fptemp = fopen(tempfile,"w")) == NULL ) {
  882. X          clear_bottom(0);
  883. X--- 1039,1045 ----
  884. X      char line[LINELTH+1], inpch;
  885. X      char save[LINELTH][LINELTH+1];
  886. X  
  887. X!     /*open file; used in mailopen() as well */
  888. X      sprintf(tempfile,"%s%hd.tmp",msgfile,country);
  889. X      if( (fptemp = fopen(tempfile,"w")) == NULL ) {
  890. X          clear_bottom(0);
  891. X***************
  892. X*** 1046,1065 ****
  893. X  
  894. X      sprintf(mesgfile,"%s%d",msgfile,country);
  895. X      if ((mesgfp=fopen(mesgfile,"r"))==NULL) {
  896. X!             (void) unlink (tempfile) ;
  897. X          clear_bottom(0);
  898. X!         errormsg("no messages");
  899. X          makebottom();
  900. X          redraw=DONE;
  901. X          return;
  902. X      }
  903. X  
  904. X      /*read in file a line at at time*/
  905. X      if(fgets(line,LINELTH,mesgfp)==NULL) {
  906. X          done=TRUE;
  907. X          redraw=DONE;
  908. X          clear_bottom(0);
  909. X!         errormsg("no messages");
  910. X          makebottom();
  911. X      }
  912. X      if (done==FALSE) clear();
  913. X--- 1052,1083 ----
  914. X  
  915. X      sprintf(mesgfile,"%s%d",msgfile,country);
  916. X      if ((mesgfp=fopen(mesgfile,"r"))==NULL) {
  917. X!         (void) unlink (tempfile) ;
  918. X          clear_bottom(0);
  919. X!         errormsg("No Messages");
  920. X          makebottom();
  921. X          redraw=DONE;
  922. X          return;
  923. X      }
  924. X  
  925. X+     /* check for people sending mail */
  926. X+     sprintf(line,"send.%s%hd",msgfile,country);
  927. X+     if (access(line,00)==0) {
  928. X+         /* someone is sending mail to the country */
  929. X+         (void) unlink (tempfile) ;
  930. X+         clear_bottom(0);
  931. X+         errormsg("Someone is sending you mail... please wait.");
  932. X+         makebottom();
  933. X+         redraw=DONE;
  934. X+         return;
  935. X+     }
  936. X+ 
  937. X      /*read in file a line at at time*/
  938. X      if(fgets(line,LINELTH,mesgfp)==NULL) {
  939. X          done=TRUE;
  940. X          redraw=DONE;
  941. X          clear_bottom(0);
  942. X!         errormsg("No messages");
  943. X          makebottom();
  944. X      }
  945. X      if (done==FALSE) clear();
  946. X***************
  947. X*** 1120,1137 ****
  948. X      char ch;
  949. X      char name[NAMELTH+1];
  950. X      int temp=(-1);
  951. X!     int linedone;
  952. X      char line[BIGLTH];
  953. X  
  954. X      /*what nation to send to*/
  955. X      clear();
  956. X!     mvprintw(0,0,"to send a message to the administrator, send to 'god';");
  957. X!     mvprintw(1,0,"to post to the news, send to 'news':");
  958. X!     mvprintw(2,0,"Enter the name of the country to send to:");
  959. X      refresh();
  960. X      temp=get_country();
  961. X  
  962. X!     if( temp == (-2) ) {
  963. X          strcpy(name,"news");
  964. X      } else {
  965. X          /* quick return on bad input */
  966. X--- 1138,1155 ----
  967. X      char ch;
  968. X      char name[NAMELTH+1];
  969. X      int temp=(-1);
  970. X!     int linedone,dotitles=TRUE;
  971. X      char line[BIGLTH];
  972. X  
  973. X      /*what nation to send to*/
  974. X      clear();
  975. X!     mvaddstr(0,0,"To send a message to the administrator, send to 'god';");
  976. X!     mvaddstr(1,0,"To post to the news, send to 'news':");
  977. X!     mvaddstr(2,0,"Enter the name of the country to send to: ");
  978. X      refresh();
  979. X      temp=get_country();
  980. X  
  981. X!     if( temp == NEWSMAIL ) {
  982. X          strcpy(name,"news");
  983. X      } else {
  984. X          /* quick return on bad input */
  985. X***************
  986. X*** 1141,1179 ****
  987. X          strcpy(name,ntn[temp].name);    /* find nation name */
  988. X      }
  989. X  
  990. X!     mailopen( temp );
  991. X  
  992. X-     move(0,0);
  993. X-     clrtoeol();
  994. X-     move(1,0);
  995. X-     clrtoeol();
  996. X-     move(2,0);
  997. X-     clrtoeol();
  998. X-     standout();
  999. X-     if(temp != -2)
  1000. X-         mvprintw(3,(COLS-25)/2,"message to nation %s",name);
  1001. X-     else
  1002. X-         mvprintw(3,(COLS-25)/2,"message to all players");
  1003. X-     mvprintw(LINES-2,(COLS-35)/2,"end with a return on a new line");
  1004. X-     standend();
  1005. X  
  1006. X- 
  1007. X      if(temp != -2) {
  1008. X          if (country==0)
  1009. X!         fprintf(fm,"Message to %s from GOD (%s of year %d)\n",name,PSEASON(TURN),YEAR(TURN));
  1010. X!         else    fprintf(fm,"Message to %s from %s (%s of year %d)\n",name,curntn->name,PSEASON(TURN),YEAR(TURN));
  1011. X      } else fprintf(fm,"5.----------\n");
  1012. X  
  1013. X-     y=6;
  1014. X-     x=0;
  1015. X-     refresh();
  1016. X      while(done==FALSE) {
  1017. X          linedone=FALSE;
  1018. X          ch=' ';
  1019. X          /*read line*/
  1020. X          while(linedone==FALSE){
  1021. X              /* check for delete or backspace */
  1022. X!             if(ch=='\b' || ch=='\177'){
  1023. X                  if(x>1) x--;
  1024. X                  mvaddch(y,x,' ');
  1025. X                  move(y,x);
  1026. X--- 1159,1203 ----
  1027. X          strcpy(name,ntn[temp].name);    /* find nation name */
  1028. X      }
  1029. X  
  1030. X!     if(mailopen( temp )==(-1)) {
  1031. X!         return;
  1032. X!     }
  1033. X  
  1034. X  
  1035. X      if(temp != -2) {
  1036. X          if (country==0)
  1037. X!         fprintf(fm,"Message to %s from GOD (%s of year %d)\n\n",name,PSEASON(TURN),YEAR(TURN));
  1038. X!         else    fprintf(fm,"Message to %s from %s (%s of year %d)\n\n",name,curntn->name,PSEASON(TURN),YEAR(TURN));
  1039. X      } else fprintf(fm,"5.----------\n");
  1040. X+     strcpy(line,"");
  1041. X  
  1042. X      while(done==FALSE) {
  1043. X+         if (dotitles==TRUE) {
  1044. X+             move(0,0);
  1045. X+             clrtobot();
  1046. X+             standout();
  1047. X+             if(temp != -2)
  1048. X+                 mvprintw(3,(COLS-25)/2,"Message to Nation %s",name);
  1049. X+             else
  1050. X+                 mvaddstr(3,(COLS-25)/2,"Message to All Players");
  1051. X+             mvaddstr(LINES-2,(COLS-37)/2,"End with a <Control-D> on a New Line");
  1052. X+             mvaddstr(LINES-1,(COLS-28)/2,"Hit ESC to Abort the Message");
  1053. X+             standend();
  1054. X+             mvaddstr(5,0,line);
  1055. X+             y=6;
  1056. X+             x=0;
  1057. X+             refresh();
  1058. X+             dotitles=FALSE;
  1059. X+         }
  1060. X          linedone=FALSE;
  1061. X          ch=' ';
  1062. X          /*read line*/
  1063. X          while(linedone==FALSE){
  1064. X              /* check for delete or backspace */
  1065. X!             switch(ch) {
  1066. X!             case '\b':
  1067. X!             case '\177':
  1068. X!                 /* backspace or delete */
  1069. X                  if(x>1) x--;
  1070. X                  mvaddch(y,x,' ');
  1071. X                  move(y,x);
  1072. X***************
  1073. X*** 1180,1199 ****
  1074. X                  line[x]=' ';
  1075. X                  refresh();
  1076. X                  ch=getch();
  1077. X!             } else if((ch=='\n')||(ch=='\r')) linedone=TRUE;
  1078. X!             else if(isprint(ch)&&(x<65)){
  1079. X!                 /*concatonate to end*/
  1080. X!                 line[x]=ch;
  1081. X!                 mvaddch(y,x,ch);
  1082. X!                 x++;
  1083. X                  refresh();
  1084. X!                 ch=getch();
  1085. X!             } else if (ch==' ') {
  1086. X                  wrefresh(stdscr);
  1087. X                  ch=getch();
  1088. X!             } else    ch=getch();
  1089. X          }
  1090. X!         if((ch!='\n')&&(ch!='\r')) {
  1091. X              mvaddch(y,x,ch);
  1092. X              line[x]=ch;
  1093. X              x++;
  1094. X--- 1204,1267 ----
  1095. X                  line[x]=' ';
  1096. X                  refresh();
  1097. X                  ch=getch();
  1098. X!                 break;
  1099. X!             case '\n':
  1100. X!             case '\r':
  1101. X!                 /* newline or carriage return */
  1102. X!                 linedone=TRUE;
  1103. X!                 break;
  1104. X!             case '\004':
  1105. X!                 /* a control-d was hit */
  1106. X!                 if (x==1) {
  1107. X!                     linedone=TRUE;
  1108. X!                     done=TRUE;
  1109. X!                 } else {
  1110. X!                     standout();
  1111. X!                     mvaddstr(LINES-3,(COLS-37)/2,"Hit [RETURN] Control-D to End Message");
  1112. X!                     standend();
  1113. X!                     move(y,x);
  1114. X!                     refresh();
  1115. X!                     ch = getch();
  1116. X!                     move(LINES-3,0);
  1117. X!                     clrtoeol();
  1118. X!                     refresh();
  1119. X!                 }
  1120. X!                 break;
  1121. X!             case '\033':
  1122. X!                 /* escape key was hit */
  1123. X!                 mvaddstr(LINES-3,0,"Abort Message? ");
  1124. X                  refresh();
  1125. X!                 if(getch()=='y') {
  1126. X!                     linedone=TRUE;
  1127. X!                     done=TRUE;
  1128. X!                     temp=ABORTMAIL;
  1129. X!                 } else {
  1130. X!                     move(LINES-3,0);
  1131. X!                     clrtoeol();
  1132. X!                     move(y,x);
  1133. X!                     refresh();
  1134. X!                     ch = getch();
  1135. X!                 }
  1136. X!                 break;
  1137. X!             case ' ':
  1138. X!                 /* new page -- end of form */
  1139. X                  wrefresh(stdscr);
  1140. X                  ch=getch();
  1141. X!                 break;
  1142. X!             default:
  1143. X!                 /* any remaining possibilities */
  1144. X!                 if(isprint(ch)&&(x<65)){
  1145. X!                     /*concatonate to end*/
  1146. X!                     line[x]=ch;
  1147. X!                     mvaddch(y,x,ch);
  1148. X!                     x++;
  1149. X!                     refresh();
  1150. X!                 }
  1151. X!                 ch=getch();
  1152. X!                 break;
  1153. X!             }
  1154. X          }
  1155. X!         if((ch!='\n')&&(ch!='\r')&&(ch!='\033')) {
  1156. X              mvaddch(y,x,ch);
  1157. X              line[x]=ch;
  1158. X              x++;
  1159. X***************
  1160. X*** 1200,1220 ****
  1161. X          }
  1162. X          line[x]='\0';
  1163. X  
  1164. X          /*write to file*/
  1165. X!         if(x<=1) done=TRUE;
  1166. X!         else if (temp != -2) fprintf(fm,"%s\n",line);
  1167. X!         else {
  1168. X!             if (country!=0) fprintf(fm,"5.%-9s:%s\n",curntn->name,line);
  1169. X!             else fprintf(fm,"5.God      :%s\n",line);
  1170. X          }
  1171. X-         x=0;
  1172. X-         y++;
  1173. X      }
  1174. X!     if (temp != -2) mailclose();
  1175. X!     else {
  1176. X!         mailok=FALSE;
  1177. X!         fclose(fm);
  1178. X!     }
  1179. X  }
  1180. X  
  1181. X  /*strategic move of civilians...once only*/
  1182. X--- 1268,1296 ----
  1183. X          }
  1184. X          line[x]='\0';
  1185. X  
  1186. X+         /*check for single period */
  1187. X+         if (strcmp(line," .")==0) done=TRUE;
  1188. X+ 
  1189. X          /*write to file*/
  1190. X!         if (done==FALSE) {
  1191. X!             if (temp != -2) fprintf(fm,"%s\n",line);
  1192. X!             else {
  1193. X!                 if (country!=0) fprintf(fm,"5.%-9s:%s\n",curntn->name,line);
  1194. X!                 else fprintf(fm,"5.God      :%s\n",line);
  1195. X!             }
  1196. X!             x=0;
  1197. X!             y++;
  1198. X!             if (y==LINES-3) {
  1199. X!                 standout();
  1200. X!                 mvaddstr(LINES-3,0,"Continuing...");
  1201. X!                 standend();
  1202. X!                 refresh();
  1203. X!                 sleep(2);
  1204. X!                 dotitles=TRUE;
  1205. X!             }
  1206. X          }
  1207. X      }
  1208. X!     mailclose(temp);
  1209. X  }
  1210. X  
  1211. X  /*strategic move of civilians...once only*/
  1212. X***************
  1213. X*** 1225,1231 ****
  1214. X      short    i,j;
  1215. X  
  1216. X      clear_bottom(0);
  1217. X!     if(sct[XREAL][YREAL].owner!=country){
  1218. X          errormsg("Sorry, you don't own that sector.");
  1219. X          return;
  1220. X      }
  1221. X--- 1301,1312 ----
  1222. X      short    i,j;
  1223. X  
  1224. X      clear_bottom(0);
  1225. X! #ifdef OGOD
  1226. X!     if(sct[XREAL][YREAL].owner!=country && country!=0)
  1227. X! #else
  1228. X!     if(sct[XREAL][YREAL].owner!=country)
  1229. X! #endif
  1230. X!     {
  1231. X          errormsg("Sorry, you don't own that sector.");
  1232. X          return;
  1233. X      }
  1234. X***************
  1235. X*** 1274,1280 ****
  1236. X      }
  1237. X      if((j-(YREAL)>2)||((YREAL)-j>2)) {
  1238. X          errormsg("Sorry, your people refuse to move more than two sectors.");
  1239. X!     } else if(sct[i][j].owner!=country){
  1240. X          errormsg("Sorry, you don't own that sector.");
  1241. X      } else if(movecost[i][j]<0){
  1242. X          /*need to check move cost > 0 for sector*/
  1243. X--- 1355,1367 ----
  1244. X      }
  1245. X      if((j-(YREAL)>2)||((YREAL)-j>2)) {
  1246. X          errormsg("Sorry, your people refuse to move more than two sectors.");
  1247. X!     }
  1248. X! #ifdef OGOD
  1249. X!     else if(sct[i][j].owner!=country && country!=0)
  1250. X! #else
  1251. X!     else if(sct[i][j].owner!=country)
  1252. X! #endif /*OGOD*/
  1253. X!     {
  1254. X          errormsg("Sorry, you don't own that sector.");
  1255. X      } else if(movecost[i][j]<0){
  1256. X          /*need to check move cost > 0 for sector*/
  1257. X*** oio.c    Wed Sep 20 21:40:55 1989
  1258. X--- io.c    Wed Sep 20 21:41:32 1989
  1259. X***************
  1260. X*** 387,407 ****
  1261. X  void
  1262. X  centermap()
  1263. X  {
  1264. X!   int xx,yy;
  1265. X!   xx=XREAL;
  1266. X!   yy=YREAL;
  1267. X!   xoffset = xx - (SCREEN_X_SIZE/2);
  1268. X!   yoffset = yy - (SCREEN_Y_SIZE/2);
  1269. X!   if (xoffset<0)
  1270. X!       xoffset=0;
  1271. X!   if (yoffset<0)
  1272. X!       yoffset=0;
  1273. X!   xcurs= xx-xoffset;
  1274. X!   ycurs= yy-yoffset;
  1275. X!   whatcansee();
  1276. X  }
  1277. X  
  1278. X  /************************************************************************/
  1279. X  /*    PRINTSCORE()    - like it says                    */
  1280. X  /************************************************************************/
  1281. X  void
  1282. X--- 387,485 ----
  1283. X  void
  1284. X  centermap()
  1285. X  {
  1286. X!     int xx,yy;
  1287. X!     xx=XREAL;
  1288. X!     yy=YREAL;
  1289. X!     xoffset = xx - (SCREEN_X_SIZE/2);
  1290. X!     yoffset = yy - (SCREEN_Y_SIZE/2);
  1291. X!     if (xoffset<0)
  1292. X!         xoffset=0;
  1293. X!     if (yoffset<0)
  1294. X!         yoffset=0;
  1295. X!     xcurs= xx-xoffset;
  1296. X!     ycurs= yy-yoffset;
  1297. X!     whatcansee();
  1298. X  }
  1299. X  
  1300. X  /************************************************************************/
  1301. X+ /*   JUMP_TO()      - move screen position to a specific location       */
  1302. X+ /*                    home indicates just go to capitol sector.         */
  1303. X+ /************************************************************************/
  1304. X+ void
  1305. X+ jump_to(home)
  1306. X+     int home;
  1307. X+ {
  1308. X+     int i,j,done;
  1309. X+     static int next_ntn;
  1310. X+ 
  1311. X+     /* find location to jump to */
  1312. X+     if (home) {
  1313. X+         if (country==0) {
  1314. X+             /* check if in sequence */
  1315. X+             if ((XREAL!=ntn[next_ntn].capx)
  1316. X+             ||(YREAL!=ntn[next_ntn].capy)) {
  1317. X+                 next_ntn= 0;
  1318. X+             }
  1319. X+             /* find next capitol */
  1320. X+             done = FALSE;
  1321. X+             do {
  1322. X+                 next_ntn++;
  1323. X+                 if (next_ntn==NTOTAL) {
  1324. X+                     j = 0;
  1325. X+                     for(i=0;i<NTOTAL;i++)
  1326. X+                     if (isntn(ntn[i].active)) {
  1327. X+                         j = i;
  1328. X+                         i = NTOTAL;
  1329. X+                     }
  1330. X+                     next_ntn = j;
  1331. X+                     done = TRUE;
  1332. X+                 } else {
  1333. X+                     if (isntn(ntn[next_ntn].active)) {
  1334. X+                         done = TRUE;
  1335. X+                     }
  1336. X+                 }
  1337. X+             } while (done==FALSE);
  1338. X+             /* default location; or next capitol */
  1339. X+             if (next_ntn==0) {
  1340. X+                 i = MAPX/2-1;
  1341. X+                 j = MAPY/2-1;
  1342. X+             } else {
  1343. X+                 i = ntn[next_ntn].capx;
  1344. X+                 j = ntn[next_ntn].capy;
  1345. X+             }
  1346. X+         } else {
  1347. X+             /* go to capitol */
  1348. X+             i = curntn->capx;
  1349. X+             j = curntn->capy;
  1350. X+         }
  1351. X+     } else {
  1352. X+         /* entered location */
  1353. X+         clear_bottom(0);
  1354. X+         mvaddstr(LINES-3,0,"Jump to what X location? ");
  1355. X+         refresh();
  1356. X+         i = get_number();
  1357. X+         if (i==(-1)) return;
  1358. X+         if (i>=MAPX) {
  1359. X+             errormsg("That location is out of this world!");
  1360. X+             return;
  1361. X+         }
  1362. X+         mvaddstr(LINES-2,0,"Jump to what Y location? ");
  1363. X+         refresh();
  1364. X+         j = get_number();
  1365. X+         if (j==(-1)) return;
  1366. X+         if (j>=MAPY) {
  1367. X+             errormsg("That location is out of this world!");
  1368. X+             return;
  1369. X+         }
  1370. X+     }
  1371. X+     /* now center location about given position */
  1372. X+     xcurs = i;
  1373. X+     ycurs = j;
  1374. X+     xoffset = yoffset = 0;
  1375. X+     centermap();
  1376. X+ }
  1377. X+ 
  1378. X+ /************************************************************************/
  1379. X  /*    PRINTSCORE()    - like it says                    */
  1380. X  /************************************************************************/
  1381. X  void
  1382. X***************
  1383. X*** 470,477 ****
  1384. X      int svcountry=country;
  1385. X      int slaves=0;
  1386. X      int i,j;
  1387. X!     country=sct[x][y].owner;
  1388. X  
  1389. X      if(slaver==TRUE){
  1390. X          slaves= sct[x][y].people/4;
  1391. X          sct[x][y].people-=slaves;
  1392. X--- 548,556 ----
  1393. X      int svcountry=country;
  1394. X      int slaves=0;
  1395. X      int i,j;
  1396. X!     int people_to_add;
  1397. X  
  1398. X+     country=sct[x][y].owner;
  1399. X      if(slaver==TRUE){
  1400. X          slaves= sct[x][y].people/4;
  1401. X          sct[x][y].people-=slaves;
  1402. X***************
  1403. X*** 499,506 ****
  1404. X      for(i=x-2;i<=x+2;i++) for(j=y-2;j<=y+2;j++)
  1405. X          if(ONMAP(i,j)
  1406. X          &&(ntn[sct[i][j].owner].race==ntn[sct[x][y].owner].race)) {
  1407. X!             sct[i][j].people += sct[x][y].people / count;
  1408. X!             if(isupd==0) SADJCIV2;
  1409. X          }
  1410. X      } else {
  1411. X          sct[x][y].people /= 2;
  1412. X--- 578,587 ----
  1413. X      for(i=x-2;i<=x+2;i++) for(j=y-2;j<=y+2;j++)
  1414. X          if(ONMAP(i,j)
  1415. X          &&(ntn[sct[i][j].owner].race==ntn[sct[x][y].owner].race)) {
  1416. X!             people_to_add = sct[x][y].people / count;
  1417. X!             /* don't show until next turn if player move */
  1418. X!             if(isupd==0) SADJCIV3;
  1419. X!             else    sct[x][y].people += people_to_add;
  1420. X          }
  1421. X      } else {
  1422. X          sct[x][y].people /= 2;
  1423. X*** onewhelp.c    Wed Sep 20 21:40:57 1989
  1424. X--- newhelp.c    Wed Sep 20 21:41:32 1989
  1425. X***************
  1426. X*** 46,51 ****
  1427. X--- 46,52 ----
  1428. X      fprintf(fp,"s/XBREAKJIHAD/%ld/g\n",BREAKJIHAD);
  1429. X      fprintf(fp,"s/XCONQENV/%s/g\n",ENVIRON_OPTS);
  1430. X      fprintf(fp,"s/XNCITYCOST/%d/g\n",N_CITYCOST);
  1431. X+     fprintf(fp,"s/XREBUILDCOST/%d/g\n",REBUILDCOST);
  1432. X  
  1433. X      /* check all the defined options */
  1434. X  #ifdef OGOD
  1435. X*** odata.c    Wed Sep 20 21:40:54 1989
  1436. X--- data.c    Wed Sep 20 21:41:32 1989
  1437. X***************
  1438. X*** 247,253 ****
  1439. X  struct sprd_sht spread;
  1440. X  
  1441. X  FILE    *fm;
  1442. X! int    mailok=FALSE;
  1443. X  
  1444. X  #ifdef CONQUER
  1445. X  #ifdef SYSMAIL
  1446. X--- 247,253 ----
  1447. X  struct sprd_sht spread;
  1448. X  
  1449. X  FILE    *fm;
  1450. X! int    mailok=DONEMAIL;
  1451. X  
  1452. X  #ifdef CONQUER
  1453. X  #ifdef SYSMAIL
  1454. X*** omagic.c    Wed Sep 20 21:40:55 1989
  1455. X--- magic.c    Wed Sep 20 21:41:33 1989
  1456. X***************
  1457. X*** 197,205 ****
  1458. X          if (get_god()) return;
  1459. X      }
  1460. X  
  1461. X      while(done==FALSE){
  1462. X          done=TRUE;
  1463. X!         clear();
  1464. X          county=3;
  1465. X          countx=0;
  1466. X          redraw=FULL;
  1467. X--- 197,207 ----
  1468. X          if (get_god()) return;
  1469. X      }
  1470. X  
  1471. X+     clear();
  1472. X      while(done==FALSE){
  1473. X          done=TRUE;
  1474. X!         move(0,0);
  1475. X!         clrtobot();
  1476. X          county=3;
  1477. X          countx=0;
  1478. X          redraw=FULL;
  1479. X***************
  1480. X*** 242,248 ****
  1481. X              mvaddstr(county++,0,"DO YOU WISH TO CHANGE THIS NATION'S POWERS? [yn]");
  1482. X              standend();
  1483. X              refresh();
  1484. X!             if (getch()=='y') god_magk(FALSE);
  1485. X          } else
  1486. X  #endif OGOD
  1487. X          if(price <= curntn->jewels){
  1488. X--- 244,250 ----
  1489. X              mvaddstr(county++,0,"DO YOU WISH TO CHANGE THIS NATION'S POWERS? [yn]");
  1490. X              standend();
  1491. X              refresh();
  1492. X!             if (getch()=='y') god_magk();
  1493. X          } else
  1494. X  #endif OGOD
  1495. X          if(price <= curntn->jewels){
  1496. X***************
  1497. X*** 252,258 ****
  1498. X          refresh();
  1499. X          if(getch()=='y'){
  1500. X              done=FALSE;
  1501. X!             mvprintw(county++,0,"ENTER SELECTION (1,2,3):");
  1502. X              refresh();
  1503. X              type = getch() - '0';
  1504. X              if(type==M_MIL || type==M_CIV || type==M_MGK){
  1505. X--- 254,260 ----
  1506. X          refresh();
  1507. X          if(getch()=='y'){
  1508. X              done=FALSE;
  1509. X!             mvaddstr(county++,0,"ENTER SELECTION (1,2,3):");
  1510. X              refresh();
  1511. X              type = getch() - '0';
  1512. X              if(type==M_MIL || type==M_CIV || type==M_MGK){
  1513. X***************
  1514. X*** 821,828 ****
  1515. X      int county,countx,choice;
  1516. X      int remove,i,done=FALSE;
  1517. X  
  1518. X      while (done==FALSE) {
  1519. X-         clear();
  1520. X          county=3;
  1521. X          countx=0;
  1522. X          standout();
  1523. X--- 823,830 ----
  1524. X      int county,countx,choice;
  1525. X      int remove,i,done=FALSE;
  1526. X  
  1527. X+     clear();
  1528. X      while (done==FALSE) {
  1529. X          county=3;
  1530. X          countx=0;
  1531. X          standout();
  1532. X***************
  1533. X*** 845,851 ****
  1534. X              }
  1535. X          }
  1536. X          move(0,0);
  1537. X!         clrtoeol();
  1538. X          if (remove)
  1539. X          mvprintw(0,(COLS/2)-15,"CURRENT POWERS FOR %s",curntn->name);
  1540. X          else
  1541. X--- 847,853 ----
  1542. X              }
  1543. X          }
  1544. X          move(0,0);
  1545. X!         clrtobot();
  1546. X          if (remove)
  1547. X          mvprintw(0,(COLS/2)-15,"CURRENT POWERS FOR %s",curntn->name);
  1548. X          else
  1549. X*** onewlogin.c    Wed Sep 20 21:40:57 1989
  1550. X--- newlogin.c    Wed Sep 20 21:41:33 1989
  1551. X***************
  1552. X*** 113,119 ****
  1553. X          if((i!=x)&&(j!=y)&&(ONMAP(i,j))
  1554. X          &&(sct[i][j].altitude!=WATER)) {
  1555. X              if (rand()%2==0)
  1556. X!             sct[x][y].altitude = CLEAR;
  1557. X  
  1558. X              if (rand()%2==0)
  1559. X                  sct[i][j].vegetation=WOOD;
  1560. X--- 113,119 ----
  1561. X          if((i!=x)&&(j!=y)&&(ONMAP(i,j))
  1562. X          &&(sct[i][j].altitude!=WATER)) {
  1563. X              if (rand()%2==0)
  1564. X!             sct[i][j].altitude = CLEAR;
  1565. X  
  1566. X              if (rand()%2==0)
  1567. X                  sct[i][j].vegetation=WOOD;
  1568. X***************
  1569. X*** 136,144 ****
  1570. X      int    ctry;
  1571. X      for( ctry=0; ctry<NTOTAL; ctry++){
  1572. X          if((ctry==0)||(ispc(ntn[ctry].active))){
  1573. X!             mailopen(ctry);
  1574. X!             fprintf(fm,"%s",string);
  1575. X!             mailclose();
  1576. X          }
  1577. X      }
  1578. X  }
  1579. X--- 136,146 ----
  1580. X      int    ctry;
  1581. X      for( ctry=0; ctry<NTOTAL; ctry++){
  1582. X          if((ctry==0)||(ispc(ntn[ctry].active))){
  1583. X!             if (mailopen(ctry)!=(-1)) {
  1584. X!                 fprintf(fm,"Message from Conquer\n\n");
  1585. X!                 fprintf(fm,"%s\n",string);
  1586. X!                 mailclose(ctry);
  1587. X!             }
  1588. X          }
  1589. X      }
  1590. X  }
  1591. X***************
  1592. X*** 394,400 ****
  1593. X          /*get name*/
  1594. X          while(valid==FALSE) {
  1595. X              valid=TRUE;
  1596. X!             mvprintw(1,0,"Enter a Name for your Country: ");
  1597. X              clrtoeol();
  1598. X              refresh();
  1599. X              get_nname(tempc);
  1600. X--- 396,402 ----
  1601. X          /*get name*/
  1602. X          while(valid==FALSE) {
  1603. X              valid=TRUE;
  1604. X!             mvaddstr(1,0,"Enter a Name for your Country: ");
  1605. X              clrtoeol();
  1606. X              refresh();
  1607. X              get_nname(tempc);
  1608. X***************
  1609. X*** 431,437 ****
  1610. X  
  1611. X          valid=FALSE;
  1612. X          while(valid==FALSE) {            /* password routine */
  1613. X!             mvprintw(2,0,"Enter National Password: ");
  1614. X              clrtoeol();
  1615. X              refresh();
  1616. X              i = get_pass(tempc);
  1617. X--- 433,439 ----
  1618. X  
  1619. X          valid=FALSE;
  1620. X          while(valid==FALSE) {            /* password routine */
  1621. X!             mvaddstr(2,0,"Enter National Password: ");
  1622. X              clrtoeol();
  1623. X              refresh();
  1624. X              i = get_pass(tempc);
  1625. X***************
  1626. X*** 442,448 ****
  1627. X                  newerror("Password Too Long");
  1628. X                  continue;
  1629. X              }
  1630. X!             mvprintw(2,0,"Reenter National Password: ");
  1631. X              clrtoeol();
  1632. X              refresh();
  1633. X              i = get_pass(passwd);
  1634. X--- 444,450 ----
  1635. X                  newerror("Password Too Long");
  1636. X                  continue;
  1637. X              }
  1638. X!             mvaddstr(2,0,"Reenter National Password: ");
  1639. X              clrtoeol();
  1640. X              refresh();
  1641. X              i = get_pass(passwd);
  1642. X***************
  1643. X*** 457,463 ****
  1644. X          valid=FALSE;
  1645. X          while(valid==FALSE) {
  1646. X              valid=TRUE;
  1647. X!             mvprintw(2,0,"Enter the name of your country's leader (Ex. The Ed, Gandalf, Conan)");
  1648. X              clrtoeol();
  1649. X              mvprintw(3,0,"    [maximum %d characters]: ",LEADERLTH);
  1650. X              refresh();
  1651. X--- 459,465 ----
  1652. X          valid=FALSE;
  1653. X          while(valid==FALSE) {
  1654. X              valid=TRUE;
  1655. X!             mvaddstr(2,0,"Enter the name of your country's leader (Ex. The Ed, Gandalf, Conan)");
  1656. X              clrtoeol();
  1657. X              mvprintw(3,0,"    [maximum %d characters]: ",LEADERLTH);
  1658. X              refresh();
  1659. X***************
  1660. X*** 471,477 ****
  1661. X  
  1662. X          mvprintw(2,0,"Leader Name: %s", curntn->leader);
  1663. X          clrtoeol();
  1664. X!         mvprintw(3,0,"Enter your Race [ (D)warf (E)lf (H)uman (O)rc ]:");
  1665. X          clrtoeol();
  1666. X          refresh();
  1667. X          valid=FALSE;
  1668. X--- 473,479 ----
  1669. X  
  1670. X          mvprintw(2,0,"Leader Name: %s", curntn->leader);
  1671. X          clrtoeol();
  1672. X!         mvaddstr(3,0,"Enter your Race [ (D)warf (E)lf (H)uman (O)rc ]:");
  1673. X          clrtoeol();
  1674. X          refresh();
  1675. X          valid=FALSE;
  1676. X***************
  1677. X*** 482,488 ****
  1678. X              case 'd':
  1679. X                  /*MINER POWER INATE TO DWARVES*/
  1680. X                  newmsg("Dwarves have MINING skills");
  1681. X!                 mvprintw(3,0,"National Race: Dwarf");
  1682. X                  clrtoeol();
  1683. X                  curntn->powers=MINER;
  1684. X                  x=MINER;
  1685. X--- 484,490 ----
  1686. X              case 'd':
  1687. X                  /*MINER POWER INATE TO DWARVES*/
  1688. X                  newmsg("Dwarves have MINING skills");
  1689. X!                 mvaddstr(3,0,"National Race: Dwarf");
  1690. X                  clrtoeol();
  1691. X                  curntn->powers=MINER;
  1692. X                  x=MINER;
  1693. X***************
  1694. X*** 503,509 ****
  1695. X              case 'E':
  1696. X              case 'e':
  1697. X                  newmsg("Elves are magically cloaked (VOID power)");
  1698. X!                 mvprintw(3,0,"National Race: Elf");
  1699. X                  clrtoeol();
  1700. X                  curntn->powers=THE_VOID;
  1701. X                  x=THE_VOID;
  1702. X--- 505,511 ----
  1703. X              case 'E':
  1704. X              case 'e':
  1705. X                  newmsg("Elves are magically cloaked (VOID power)");
  1706. X!                 mvaddstr(3,0,"National Race: Elf");
  1707. X                  clrtoeol();
  1708. X                  curntn->powers=THE_VOID;
  1709. X                  x=THE_VOID;
  1710. X***************
  1711. X*** 525,531 ****
  1712. X              case 'o':
  1713. X                  /*MINOR MONSTER POWER INATE TO ORCS*/
  1714. X                  newmsg("Your leader is a Monster!");
  1715. X!                 mvprintw(3,0,"National Race: Orc");
  1716. X                  clrtoeol();
  1717. X                  curntn->powers=MI_MONST;
  1718. X                  x=MI_MONST;
  1719. X--- 527,533 ----
  1720. X              case 'o':
  1721. X                  /*MINOR MONSTER POWER INATE TO ORCS*/
  1722. X                  newmsg("Your leader is a Monster!");
  1723. X!                 mvaddstr(3,0,"National Race: Orc");
  1724. X                  clrtoeol();
  1725. X                  curntn->powers=MI_MONST;
  1726. X                  x=MI_MONST;
  1727. X***************
  1728. X*** 547,553 ****
  1729. X              case 'h':
  1730. X                  curntn->race=HUMAN;
  1731. X                  newmsg("Humans have the combat skill of a WARRIOR");
  1732. X!                 mvprintw(3,0,"National Race: Human");
  1733. X                  clrtoeol();
  1734. X                  curntn->powers = WARRIOR;
  1735. X                  x=WARRIOR;
  1736. X--- 549,555 ----
  1737. X              case 'h':
  1738. X                  curntn->race=HUMAN;
  1739. X                  newmsg("Humans have the combat skill of a WARRIOR");
  1740. X!                 mvaddstr(3,0,"National Race: Human");
  1741. X                  clrtoeol();
  1742. X                  curntn->powers = WARRIOR;
  1743. X                  x=WARRIOR;
  1744. X***************
  1745. X*** 576,582 ****
  1746. X              valid=TRUE;
  1747. X              curntn->active=PC_EVIL;
  1748. X          } else {
  1749. X!             mvprintw(5,0,"Please Enter Alignment [ (G)ood, (N)eutral, (E)vil ]");
  1750. X              refresh();
  1751. X          }
  1752. X          while (valid==FALSE) {
  1753. X--- 578,584 ----
  1754. X              valid=TRUE;
  1755. X              curntn->active=PC_EVIL;
  1756. X          } else {
  1757. X!             mvaddstr(5,0,"Please Enter Alignment [ (G)ood, (N)eutral, (E)vil ]");
  1758. X              refresh();
  1759. X          }
  1760. X          while (valid==FALSE) {
  1761. X***************
  1762. X*** 607,613 ****
  1763. X          curntn->mark = ' ';
  1764. X          while(TRUE) {
  1765. X              temp = 30;
  1766. X!             mvprintw(6,0,"This can be any of the following:");
  1767. X              for (tempc[0]='!';tempc[0]<='~';tempc[0]++) {
  1768. X                  if( markok( tempc[0], FALSE ) ) {
  1769. X                      temp += 2;
  1770. X--- 609,615 ----
  1771. X          curntn->mark = ' ';
  1772. X          while(TRUE) {
  1773. X              temp = 30;
  1774. X!             mvaddstr(6,0,"This can be any of the following:");
  1775. X              for (tempc[0]='!';tempc[0]<='~';tempc[0]++) {
  1776. X                  if( markok( tempc[0], FALSE ) ) {
  1777. X                      temp += 2;
  1778. X***************
  1779. X*** 618,624 ****
  1780. X                      printw(" %c",tempc[0]);
  1781. X                  }
  1782. X              }
  1783. X!             mvprintw(5,0,"Enter National Mark (for maps): ");
  1784. X              clrtoeol();
  1785. X              refresh();
  1786. X              tempc[0] = getch();
  1787. X--- 620,626 ----
  1788. X                      printw(" %c",tempc[0]);
  1789. X                  }
  1790. X              }
  1791. X!             mvaddstr(5,0,"Enter National Mark (for maps): ");
  1792. X              clrtoeol();
  1793. X              refresh();
  1794. X              tempc[0] = getch();
  1795. X***************
  1796. X*** 651,657 ****
  1797. X                  if (curntn->race==ORC) {            
  1798. X                      switch(i) {
  1799. X                      case CH_MOVEMENT:
  1800. X!                         mvprintw(ypos++,COLS/2+5,"  -     --------");
  1801. X                          continue;
  1802. X                      case CH_REPRO:
  1803. X                          x = 2*Munits[i]*Mvalues[i];
  1804. X--- 653,659 ----
  1805. X                  if (curntn->race==ORC) {            
  1806. X                      switch(i) {
  1807. SHAR_EOF
  1808. echo "End of part 3, continue with part 4"
  1809. echo "4" > s2_seq_.tmp
  1810. exit 0
  1811.